import QtQuick 2.6

import "../../Base/Config"

import "../../FallView" as FallView
import "../../TCommunity/Post" as TCPost


FallView.FallView {
    z: -1
    spacing: Size.elementInterval
    delegate: TCPost.AdvPost {
        width: parent.width
        username: model.username
        headSource: model.head
        subject: model.subjectText
        time: model.time
        location: model.location
        imageCount: model.imageCount
        imageSource: model.image
        commentText: model.comment
    }
    model: ListModel {
        id: listmodel
        Component.onCompleted: {
            listmodel.append({
                                 username: "欢乐的0403",
                                 head: "../../../resources/tests/touxiang02.svg",
                                 subjectText: Subject.Music,
                                 time: new Date().toISOString(),
                                 location: "广西 来宾  ",
                                 imageCount: 1,
                                 image: "../../../resources/tests/121025539394.jpg",
                                 comment: "123123"
                             })
            listmodel.append({
                                 username: "欢乐的0403",
                                 head: "../../../resources/tests/touxiang02.svg",
                                 subjectText: Subject.Music,
                                 time: new Date().toISOString(),
                                 location: "广西 来宾  ",
                                 imageCount: 1,
                                 image: "../../../resources/tests/355X630.jpg",
                                 comment: "123123"
                             })
            listmodel.append({
                                 username: "欢乐的0403",
                                 head: "../../../resources/tests/touxiang02.svg",
                                 subjectText: Subject.Music,
                                 time: new Date().toISOString(),
                                 location: "广西 来宾  ",
                                 imageCount: 8,
                                 image: "../../../resources/tests/355X400.jpg",
                                 comment: "123123"
                             })
        }
    }
}
